package other.thread;

import java.util.concurrent.Callable;

public class MyCallable implements Callable {
    @Override
    public Object call() throws Exception {
        for (int i = 0; i < 10; i++) {
            System.out.println("线程" + Thread.currentThread() + "打印出：" + i);
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                System.out.println("线程正处于阻塞状态，请稍等");
            }
        }
        return 10;
    }
}
